<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
<form action="${contextPath }/admin/product/delete.do" method="post">
<table width="100%">
	<tbody>
		<tr>
			<td><input type='checkbox' name="check"/></td><td>编号</td><td>产品名称</td><td>图片</td><td>操作</td>
		</tr>
		<c:if test="${obj.resultList!=null}">
			<c:forEach items="${obj.resultList}" var="o">
				<tr>
					<td><input value="${o.id }" name="ids" type="checkbox"/></td>
					<td>${o.id}</td>
					<td>${o.productName}</td>
					<td><img src="${contextPath }${o.image}" width="50px" height="50px"></img></td>
					<td><a href="${contextPath}/admin/product/preupdate.do?productid=${o.id}">编辑</a></td>
				</tr>				
			</c:forEach>
		</c:if>
		<tr>
			<td></td><td colspan="4"><input type="submit" value="删除所选产品"/></td>
		</tr>
	</tbody>
</table>
</form>
<table width="100%">
<tbody>
	<tr><td></td><td>当前第${obj.page.pageNumber }页 ,共${obj.page.recordCount }条记录</td>
		<td>
		<c:if test="${obj.page.first}">
			<a href="javascript:;" onclick="alert('已经是第一页了！')">首页</a>
			<a href="javascript:;" onclick="alert('已经是第一页了！')">前一页</a>
		</c:if>
		<c:if test="${!obj.page.first}">
			<a href="${contextPath }/admin/product/manage.do">首页</a>
			<a href="${contextPath }/admin/product/manage.do?pageNum=${obj.page.pageNumber-1}">前一页</a>
		</c:if>
		<c:if test="${obj.page.last}">
			<a href="javascript:;" onclick="alert('已经是最后一页了！')">后一页</a>
			<a href="javascript:;" onclick="alert('已经是最后一页了！')">尾页</a>
		</c:if>
		<c:if test="${!obj.page.last}">
			<a href="${contextPath }/admin/product/manage.do?pageNum=${obj.page.pageNumber+1}">后一页</a>
			<a href="${contextPath }/admin/product/manage.do?pageNum=${obj.page.pageCount}">尾页</a>
		</c:if>
		</td>
		</tr>
</tbody>
</table>
